home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / mus / edit / XModule34.lha / XModule / Install_XModule < prev    next >
Text File  |  1995-06-14  |  16KB  |  590 lines

  1. ;*
  2. ;* $VER: Install_XModule 3.4 (14.6.95) Copyright © 1994,95 Bernardo Innocenti
  3. ;*
  4. ;* Installer script for XModule
  5. ;*
  6.  
  7. ;***************************************************************************
  8. ; English strings
  9. ;***************************************************************************
  10.  
  11. (set #askdest        (cat "In which directory should XModule be installed?\n"
  12.                     "(A drawer called \"XModule\" will be created)"))
  13.  
  14. (set #askdest-help    (cat "Please, select the directory or partition in which you would like "
  15.                     "XModule installed (a drawer named \"XModule\" will be created "
  16.                     "in the directory you have selected).\n\n\n"
  17.                     @askdir-help))
  18.  
  19. (set #askcats        "Which language catalogs should be installed?")
  20.  
  21. (set #askcats-help    (cat "XModule has built-in english strings. To operate XModule in "
  22.                     "a different language a catalog file for that languge is needed. "
  23.                     "This catalog will be copied to the directory \"Catalogs/\" in "
  24.                     "the XModule drawer.  You need Workbench 2.1 or higher in order "
  25.                     "to use this feature.\n\n" @askchoice-help))
  26.  
  27. (set #askdocformat    "Please select which documentation format(s) to install:")
  28.  
  29. (set #askpatteditvers "Which version of the Pattern Editor gadget should be installed?")
  30.  
  31. (set #patteditvers-choice1 "Standard version")
  32. (set #patteditvers-choice2 "68020 or higher only")
  33.  
  34. (set #askpatteditvers-help (cat "Choose the correct version for your machine.  If you are "
  35.                     "unsure what version should be used, pick the 68000 version.\n\n\n"
  36.                     @askchoice-help))
  37.  
  38. (set #askpatteditdest "In which directory should \"pattedit.gadget\" be installed?")
  39.  
  40. (set #askpatteditdest-help (cat "\"pattedit.gadget\" can be placed in the XModule drawer "
  41.                     "(recommended for 2.0-2.1 users) or in the default custom gadgets "
  42.                     "directory \"SYS:Classes/Gadgets\", where other programs will be "
  43.                     "able to use it.\nInstalling it to another directory may prevent "
  44.                     "XModule from finding the gadget.\n\n\n"))
  45.  
  46. (set #patteditdest-choice1 "Copy to XModule drawer")
  47. (set #patteditdest-choice2 "Copy to \"SYS:Classes/Gadgets/\" drawer")
  48. (set #patteditdest-choice3 "Manual select...")
  49.  
  50. (set #magicwb-str    (cat "Do you want MagicWB-style icons for XModule?\n"
  51.                     "(Requires MagicWB installed in your system)\n\n"
  52.                     "MagicWB is a collection of fine 8 color icons made by "
  53.                     "Martin Huttenloher.  These icons require a special palette, "
  54.                     "otherwise they look awful.\n"))
  55.  
  56. (set #magicwb-help    "Answer \"Yes\" only if your system preferences are properly set.")
  57.  
  58. (set #docformat-help (cat "Choose AmigaGuide documentation if you are running "
  59.                     "Workbench 2.1 or higher and/or you have Commodore AmigaGuide "
  60.                     "hypertext reader installed.  Otherwhise choose the normal "
  61.                     "documentation.\n\n"
  62.                     @askoptions-help))
  63.  
  64. (set #toolman-brush (cat "This distribution includes a brush image suitable for ToolManager docks.\n\n"
  65.                     "Do you want to copy it to your brush drawer?"))
  66.  
  67. (set #toolman-help    (cat "ToolManager is a program by Stefan Backer which extends Workbench "
  68.                     "usability allowing the user to start applications through AppIcons, AppMenus and "
  69.                     "small windows filled with buttons called docks.\n\n"
  70.                     "If you answer \"Yes\", you will be asked in which directory the brush image "
  71.                     "should be copied.\n\n"))
  72.  
  73. (set #ask-toolmandir "In which directory should the ToolManager image be copied?")
  74.  
  75.  
  76. (set #bad-kick        "Sorry, XModule requires Kickstart version 2.04 or higher.")
  77.  
  78. (set #makingdir            "Creating XModule Directory...")
  79. (set #copying-xmodule    "Copying XModule...")
  80. (set #copying-players    "Copying Players...")
  81. (set #copying-cats        "Copying Catalogs...")
  82. (set #copying-icons        "Copying Default Icons...")
  83. (set #copying-doc        "Copying ASCII Documentation...")
  84. (set #copying-guide        "Copying AmigaGuide Documentation...")
  85. (set #copying-readme    "Copying Release Notes...")
  86. (set #copying-history    "Copying Revision History...")
  87. (set #copying-brush        "Copying Brush for ToolManager Dock...")
  88. (set #copying-pattedit    "Copying pattedit.gadget...")
  89.  
  90. (set #bonusmod-str        (cat "XModule distribution contains a fine bonus module "
  91.                         "made by FBY (Fabio Barzagli).\n\n"
  92.                         "Do you want it copied to your modules drawer?"))
  93.  
  94. (set #makingmoddir        "Creating Modules Directory...")
  95. (set #copying-mods        "Copying Bonus Modules...")
  96.  
  97.  
  98. ;***************************************************************************
  99. ; Italiano strings
  100. ;***************************************************************************
  101.  
  102. (if (= @language "italiano")
  103. (
  104.  
  105. (set #askdest        (cat "In quale directory deve essere installato l'XModule?\n"
  106.                     "(Sarà creato un cassetto \"XModule\")"))
  107.  
  108. (set #askdest-help    (cat "Scegli la directory o la partizione nella quale vuoi "
  109.                     "installare XModule (sarà creato un cassetto chiamato \"XModule\" "
  110.                     "nella directory selezionata).\n\n\n"
  111.                     @askdir-help))
  112.  
  113. (set #askcats        "Quali cataloghi devono essere istallati?")
  114.  
  115. (set #askcats-help    (cat "XModule usa di default la lingua inglese. Per usare XModule in "
  116.                     "una lingua diversa è necessario un catalogo per quella lingua. "
  117.                     "Questo catalogo sarà copiato nella directory \"Catalogs/\" nel "
  118.                     "cassetto XModule.  Hai bisogno del Workbench 2.1 o superiore per "
  119.                     "poter usare la localizzazione.\n\n" @askchoice-help))
  120.  
  121. (set #askdocformat    "Per favore scegli quale formato/i di documentazione installare:")
  122.  
  123. (set #askpatteditvers "Quale versione del gadget Pattern Editor deve essere installata?")
  124.  
  125. (set #patteditvers-choice1 "Versione standard")
  126. (set #patteditvers-choice2 "Solo per 68020 o superiori")
  127.  
  128. (set #askpatteditvers-help (cat "Scegli la versione corretta per la tua macchina.  Se non sei "
  129.                     "sicuro su quale versione usare, prendi quella per 68000.\n\n\n"
  130.                     @askchoice-help))
  131.  
  132. (set #askpatteditdest "In quale directory deve essere installato il \"pattedit.gadget\"?")
  133.  
  134. (set #askpatteditdest-help (cat "Il \"pattedit.gadget\" puo` essere posto nel cassetto XModule "
  135.                     "(raccomandato per gli utenti 2.0-2.1) o nella directory di default per i "
  136.                     "gadget custom, \"SYS:Classes/Gadgets\", dove altri programmi potranno "
  137.                     "usarlo.\nInstallarlo in un'altra directory potrebbe impedire "
  138.                     "ad XModule di trovare il gadget.\n\n\n"))
  139.  
  140. (set #patteditdest-choice1 "Copia nel cassetto di XModule")
  141. (set #patteditdest-choice2 "Copia nel cassetto \"SYS:Classes/Gadgets/\"")
  142. (set #patteditdest-choice3 "Selezione manuale del cassetto...")
  143.  
  144. (set #magicwb-str    (cat "Vuoi le icone in stile MagicWB per XModule?\n"
  145.                     "(Richiede MagicWB installato nel tuo sistema)\n\n"
  146.                     "MagicWB è una collezione di icone a 8 colori fatte da "
  147.                     "Martin Huttenloher.  Queste icone richiedono una palette speciale, "
  148.                     "altrimenti sono molto brutte a vedersi.\n"))
  149.  
  150. (set #magicwb-help    "Rispondi \"Sì\" soltanto se le tue preferenze di sistema sono impostate adeguatamente.")
  151.  
  152. (set #docformat-help (cat "Scegli la documentazione AmigaGuide se usi il "
  153.                     "Workbench 2.1 o superiore e/o se hai installato il lettore di "
  154.                     "ipertesti AmigaGuide Commodore.  Altrimenti scegli la documentazione "
  155.                     "normale.\n\n"
  156.                     @askoptions-help))
  157.  
  158. (set #toolman-brush (cat "Questa distribuzione include un'immagine adeguata ai dock del ToolManager.\n\n"
  159.                     "Vuoi copiarla nel tuo cassetto delle immagini?"))
  160.  
  161. (set #toolman-help    (cat "ToolManager è un programma di Stefan Backer che estende l'usabilità del Workbench "
  162.                     "permettendo all'utente di lanciare applicazioni tramite AppIcons, AppMenus e "
  163.                     "piccole finestre piene di pulsanti chiamate docks.\n\n"
  164.                     "Se rispondi \"Sì\", ti verrà chiesto in quale directory deve essere copiata "
  165.                     "l'immagine.\n\n"))
  166.  
  167. (set #ask-toolmandir "In quale directory deve essere copiata l'immagine per il ToolManager?")
  168.  
  169.  
  170. (set #bad-kick        "Spiacente, XModule richiede la versione 2.04 o superiore del Kickstart.")
  171.  
  172. (set #makingdir            "Creo la directory XModule...")
  173. (set #copying-xmodule    "Copio XModule...")
  174. (set #copying-players    "Copio i Players...")
  175. (set #copying-cats        "Copio i Cataloghi...")
  176. (set #copying-doc        "Copio la documentazione ASCII...")
  177. (set #copying-guide        "Copio la documentazione AmigaGuide...")
  178. (set #copying-readme    "Copio le Release Notes...")
  179. (set #copying-history    "Copio la Revision History...")
  180. (set #copying-brush        "Copio l'immagine per il dock del ToolManager...")
  181. (set #copying-pattedit    "Copio il pattedit.gadget...")
  182.  
  183. (set #bonusmod-str        (cat "La distribuzione dell'XModule include un buon modulo bonus "
  184.                         "fatto da FBY (Fabio Barzagli).\n\n"
  185.                         "Vuoi copiarlo nel tuo cassetto Modules?"))
  186.  
  187. (set #makingmoddir        "Creo la directory Modules...")
  188. (set #copying-mods        "Copio il Modulo Bonus...")
  189.  
  190. )) ; endif italiano
  191.  
  192.  
  193.  
  194. ;***************************************************************************
  195. ; Make sure we are running at least under a 2.04 system
  196. ;***************************************************************************
  197.  
  198. (set sys-ver (/ (getversion) 65536))
  199.  
  200. (if (< sys-ver 37)
  201.     (abort #bad-kick)
  202. )
  203.  
  204. (set cpu (database "cpu"))
  205.  
  206.  
  207. (welcome) ; Say Hi!
  208.  
  209.  
  210. ;***************************************************************************
  211. ; Ask user where he wants the XModule files
  212. ;***************************************************************************
  213.  
  214. (set @target-dir
  215.     (askdir
  216.         (prompt #askdest)
  217.         (help #askdest-help)
  218.         (default @default-dest)
  219.     )
  220. )
  221.  
  222. (set @target-dir (tackon @target-dir "XModule"))
  223. (set @default-dest @target-dir)
  224.  
  225.  
  226. ;***************************************************************************
  227. ; Make the XModule directory
  228. ;***************************************************************************
  229.  
  230. (complete 0)
  231.  
  232. (makedir
  233.     @target-dir
  234.     (infos)
  235.     (help @makedir-help)
  236.     (prompt #makingdir)
  237. )
  238.  
  239. ;***************************************************************************
  240. ; Ask for MagicWB icons
  241. ;***************************************************************************
  242.  
  243. (complete 5)
  244.  
  245. (if (askbool
  246.         (prompt #magicwb-str)
  247.         (help #magicwb-help)
  248.         (default 0)
  249.     )
  250.  
  251.     (set @magic-icons 1)
  252. )
  253.  
  254.  
  255. ;***************************************************************************
  256. ; Copy the XModule executable and its icon
  257. ;***************************************************************************
  258.  
  259. (complete 10)
  260.  
  261. (copyfiles
  262.     (prompt #copying-xmodule)
  263.     (source "XModule")
  264.     (dest @target-dir)
  265.     (infos)
  266. )
  267.  
  268. (if (= @magic-icons 1)
  269.     (copyfiles
  270.         (source "MagicWB_Icons/XModule.info")
  271.         (dest @target-dir)
  272.     )
  273. )
  274.  
  275.  
  276. ;***************************************************************************
  277. ; Copy the XModule players
  278. ;***************************************************************************
  279.  
  280. (complete 20)
  281.  
  282. (copyfiles
  283.     (prompt #copying-players)
  284.     (source "Players/")
  285.     (all)
  286.     (dest (tackon @target-dir "Players"))
  287. )
  288.  
  289.  
  290. ;***************************************************************************
  291. ; Copy pattedit.gadget
  292. ;***************************************************************************
  293.  
  294. (complete 30)
  295.  
  296. (if (or (= cpu "68000") (= cpu "68010"))
  297.         (set pattedit020 0) ; then
  298.         (set pattedit020 1) ; else
  299. )
  300.  
  301. (if (> @user-level 0)
  302.     (set pattedit020 (askchoice
  303.         (prompt #askpatteditvers)
  304.         (help #askpatteditvers-help)
  305.         (choices #patteditvers-choice1 #patteditvers-choice2)
  306.         (default pattedit020)
  307.     ))
  308. )
  309.  
  310.  
  311. (set pattedit-dest (tackon @target-dir "Gadgets"))
  312.  
  313.  
  314. (if  (> @user-level 1)
  315.     (if (exists "SYS:Classes/")
  316.         (select
  317.             (askchoice
  318.                 (prompt #askpatteditdest #askchoice-help)
  319.                 (help #askpatteditdest-help #askchoice)
  320.                 (choices #patteditdest-choice1 #patteditdest-choice2 #patteditdest-choice3 "Copy to XModule drawer" "Copy to \"SYS:Classes/Gadgets/\" drawer" "Manual select...")
  321.             )
  322.             (set pattedit-dest (tackon @target-dir "Gadgets"))
  323.             (set pattedit-dest "SYS:Classes/Gadgets")
  324.             (set pattedit-dest
  325.                 (askdir
  326.                     (prompt #askpatteditdest)
  327.                     (help #askpatteditdest-help #askdir-help)
  328.                     (default @default-dest)
  329.                 )
  330.             )
  331.         )
  332.     )
  333. )
  334.  
  335.  
  336. (if (= pattedit020 1)
  337.     (copylib
  338.         (prompt #copying-pattedit)
  339.         (help @copylib-help)
  340.         (source "Gadgets/pattedit.gadget_020")
  341.         (newname "pattedit.gadget")
  342.         (dest pattedit-dest)
  343.         (confirm)
  344.     )
  345.  
  346.     (copylib
  347.         (prompt #copying-pattedit)
  348.         (help @copylib-help)
  349.         (source "Gadgets/pattedit.gadget")
  350.         (dest pattedit-dest)
  351.         (confirm)
  352.     )
  353. )
  354.  
  355.  
  356. ;***************************************************************************
  357. ; Copy catalog files
  358. ;***************************************************************************
  359.  
  360. (complete 40)
  361.  
  362. (set cat-choice (askoptions
  363.     (prompt #askcats)
  364.     (help #catalogs-help)
  365.     (choices
  366.         "Italiano"
  367.     )
  368.     (default (if (= @language "italiano") 1 0))
  369. ))
  370.  
  371. (if (<> cat-choice 0)
  372. (
  373.     (makedir (tackon @target-dir "Catalogs"))
  374. ))
  375.  
  376. (if (BITAND cat-choice 1)
  377. (
  378.     (copyfiles
  379.         (prompt #copyingcats)
  380.         (source "Catalogs/Italiano/XModule.catalog")
  381.         (dest (tackon @target-dir "Catalogs/Italiano"))
  382.     )
  383. ))
  384.  
  385.  
  386.  
  387. ;***************************************************************************
  388. ; Copy default icon for modules & instruments
  389. ;***************************************************************************
  390.  
  391. (complete 50)
  392.  
  393. (if (= @magic-icons 1)
  394.     (
  395.         (copyfiles
  396.             (source "MagicWB_Icons/")
  397.             (choices "def_Module.info" "def_Instrument.info")
  398.             (dest (tackon @target-dir "Icons"))
  399.             (prompt #copying-icons)
  400.         )
  401.     )
  402.  
  403.     ( ; else
  404.         (copyfiles
  405.             (source "Icons/")
  406.             (choices "def_Module.info" "def_Instrument.info")
  407.             (dest (tackon @target-dir "Icons"))
  408.             (prompt #copying-icons)
  409.         )
  410.     )
  411. )
  412.  
  413. (tooltype
  414.     (dest (tackon @target-dir "Icons/def_Module"))
  415.     (setdefaulttool (tackon @target-dir "XModule"))
  416.     (noposition)
  417. )
  418.  
  419.  
  420.  
  421. ;***************************************************************************
  422. ; Copy documentation files
  423. ;***************************************************************************
  424.  
  425. (complete 60)
  426.  
  427. (set doc-choice (askoptions
  428.     (prompt #askdocformat)
  429.     (help #docformat-help)
  430.  
  431.     (choices
  432.         "AmigaGuide Documentation"
  433.         "ASCII Documentation"
  434.         "Release notes (ReadMe)"
  435.         "Revision History"
  436.     )
  437.     (default (if (OR (exists "SYS:Utilities/AmigaGuide") (exists "SYS:Utilities/MultiView")) 1 2))
  438. ))
  439.  
  440. (if (BITAND doc-choice 1)
  441. (
  442.     (copyfiles
  443.         (prompt #copying-guide)
  444.         (source "XModule.guide")
  445.         (dest @target-dir)
  446.         (infos)
  447.     )
  448.  
  449.     (if (= @magic-icons 1)
  450.         (copyfiles
  451.             (source "MagicWB_Icons/XModule.guide.info")
  452.             (prompt #copying-guide)
  453.             (dest @target-dir)
  454.         )
  455.     )
  456.  
  457.     (if (< sys-ver 39)
  458.         (tooltype
  459.             (dest (tackon @target-dir "XModule.guide"))
  460.             (setdefaulttool "SYS:Utlities/AmigaGuide")
  461.         )
  462.     )
  463. ))
  464.  
  465. (if (BITAND doc-choice 2)
  466. (
  467.     (copyfiles
  468.         (prompt #copying-doc)
  469.         (source "XModule.doc")
  470.         (dest @target-dir)
  471.         (infos)
  472.     )
  473.  
  474.     (if (= @magic-icons 1)
  475.         (copyfiles
  476.             (source "MagicWB_Icons/XModule.doc.info")
  477.             (prompt #copying-xmodule)
  478.             (dest @target-dir)
  479.         )
  480.     )
  481. ))
  482.  
  483.  
  484. (if (BITAND doc-choice 4)
  485. (
  486.     (copyfiles
  487.         (prompt #copying-readme)
  488.         (source "ReadMe")
  489.         (dest @target-dir)
  490.         (infos)
  491.     )
  492.  
  493.     (if (= @magic-icons 1)
  494.         (copyfiles
  495.             (source "MagicWB_Icons/ReadMe.info")
  496.             (prompt #copying-xmodule)
  497.             (dest @target-dir)
  498.         )
  499.     )
  500. ))
  501.  
  502. (if (BITAND doc-choice 8)
  503. (
  504.     (copyfiles
  505.         (prompt #copying-history)
  506.         (source "History")
  507.         (dest @target-dir)
  508.         (infos)
  509.     )
  510.  
  511.     (if (= @magic-icons 1)
  512.         (copyfiles
  513.             (source "MagicWB_Icons/History.info")
  514.             (prompt #copying-xmodule)
  515.             (dest @target-dir)
  516.         )
  517.     )
  518. ))
  519.  
  520.  
  521. ;***************************************************************************
  522. ; Copy ToolManager brush
  523. ;***************************************************************************
  524.  
  525. (complete 80)
  526.  
  527. (if (= @magic-icons 1)
  528.     (if (askbool
  529.             (prompt #toolman-brush)
  530.             (help #toolman-help)
  531.             (default 0))
  532.         (
  533.             (set @brush-dir
  534.                 (askdir
  535.                     (prompt #ask-toolmandir)
  536.                     (help #askdir-help)
  537.                     (default "SYS:Prefs/")
  538.                 )
  539.             )
  540.  
  541.             (copyfiles
  542.                 (source "MagicWB_Icons/XModule.brush")
  543.                 (prompt #copying-brush)
  544.                 (help #copyfiles-help)
  545.                 (dest @brush-dir)
  546.             )
  547.         )
  548.     )
  549. )
  550.  
  551.  
  552. ;***************************************************************************
  553. ; Copy bonus module
  554. ;***************************************************************************
  555.  
  556. (complete 90)
  557.  
  558. (if (askbool
  559.         (prompt #bonusmod-str)
  560.         (help @askbool-help)
  561.         (default 1))
  562.     (
  563.         (makedir
  564.             (tackon @target-dir "Modules")
  565.             (infos)
  566.             (prompt #makingmoddir)
  567.             (help @makedir-help)
  568.         )
  569.  
  570.         (copyfiles
  571.             (prompt #copying-mods)
  572.             (source "BonusModules")
  573.             (dest (tackon @target-dir "Modules"))
  574.             (all)
  575.             (infos)
  576.         )
  577.  
  578.         (if (= @magic-icons 1)
  579.             (copyfiles
  580.                 (source "MagicWB_Icons/def_Module.info")
  581.                 (prompt #copying-mods)
  582.                 (dest (tackon @target-dir "Modules"))
  583.                 (newname "FBY-Winning.mod.info")
  584.             )
  585.         )
  586.     )
  587. )
  588.  
  589. (complete 100)
  590.